/**
 * Copyright 2009 Joe LaPenna
 */

package com.yjm.tb.protocol.parsers;

import com.yjm.tb.protocol.error.TbCredentialsException;
import com.yjm.tb.protocol.error.TbError;
import com.yjm.tb.protocol.error.TbParseException;
import com.yjm.tb.protocol.types.TbBean;

/**
 * @author Joe LaPenna (joe@joelapenna.com)
 */
public abstract class AbstractParser<T extends TbBean> {
    abstract protected T parseInner(String  jsonData);

    public final T parse(String jsonText) throws TbCredentialsException, TbError, TbParseException {
        return parseInner(jsonText);
    }

}
